package individual.mamingchao.scratch_story.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class ActionEventsExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public ActionEventsExample() {
        oredCriteria = new ArrayList<>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Short value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Short value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Short value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Short value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Short value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Short value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Short> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Short> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Short value1, Short value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Short value1, Short value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andCodeIsNull() {
            addCriterion("code is null");
            return (Criteria) this;
        }

        public Criteria andCodeIsNotNull() {
            addCriterion("code is not null");
            return (Criteria) this;
        }

        public Criteria andCodeEqualTo(String value) {
            addCriterion("code =", value, "code");
            return (Criteria) this;
        }

        public Criteria andCodeNotEqualTo(String value) {
            addCriterion("code <>", value, "code");
            return (Criteria) this;
        }

        public Criteria andCodeGreaterThan(String value) {
            addCriterion("code >", value, "code");
            return (Criteria) this;
        }

        public Criteria andCodeGreaterThanOrEqualTo(String value) {
            addCriterion("code >=", value, "code");
            return (Criteria) this;
        }

        public Criteria andCodeLessThan(String value) {
            addCriterion("code <", value, "code");
            return (Criteria) this;
        }

        public Criteria andCodeLessThanOrEqualTo(String value) {
            addCriterion("code <=", value, "code");
            return (Criteria) this;
        }

        public Criteria andCodeLike(String value) {
            addCriterion("code like", value, "code");
            return (Criteria) this;
        }

        public Criteria andCodeNotLike(String value) {
            addCriterion("code not like", value, "code");
            return (Criteria) this;
        }

        public Criteria andCodeIn(List<String> values) {
            addCriterion("code in", values, "code");
            return (Criteria) this;
        }

        public Criteria andCodeNotIn(List<String> values) {
            addCriterion("code not in", values, "code");
            return (Criteria) this;
        }

        public Criteria andCodeBetween(String value1, String value2) {
            addCriterion("code between", value1, value2, "code");
            return (Criteria) this;
        }

        public Criteria andCodeNotBetween(String value1, String value2) {
            addCriterion("code not between", value1, value2, "code");
            return (Criteria) this;
        }

        public Criteria andChapterCodeIsNull() {
            addCriterion("chapter_code is null");
            return (Criteria) this;
        }

        public Criteria andChapterCodeIsNotNull() {
            addCriterion("chapter_code is not null");
            return (Criteria) this;
        }

        public Criteria andChapterCodeEqualTo(String value) {
            addCriterion("chapter_code =", value, "chapterCode");
            return (Criteria) this;
        }

        public Criteria andChapterCodeNotEqualTo(String value) {
            addCriterion("chapter_code <>", value, "chapterCode");
            return (Criteria) this;
        }

        public Criteria andChapterCodeGreaterThan(String value) {
            addCriterion("chapter_code >", value, "chapterCode");
            return (Criteria) this;
        }

        public Criteria andChapterCodeGreaterThanOrEqualTo(String value) {
            addCriterion("chapter_code >=", value, "chapterCode");
            return (Criteria) this;
        }

        public Criteria andChapterCodeLessThan(String value) {
            addCriterion("chapter_code <", value, "chapterCode");
            return (Criteria) this;
        }

        public Criteria andChapterCodeLessThanOrEqualTo(String value) {
            addCriterion("chapter_code <=", value, "chapterCode");
            return (Criteria) this;
        }

        public Criteria andChapterCodeLike(String value) {
            addCriterion("chapter_code like", value, "chapterCode");
            return (Criteria) this;
        }

        public Criteria andChapterCodeNotLike(String value) {
            addCriterion("chapter_code not like", value, "chapterCode");
            return (Criteria) this;
        }

        public Criteria andChapterCodeIn(List<String> values) {
            addCriterion("chapter_code in", values, "chapterCode");
            return (Criteria) this;
        }

        public Criteria andChapterCodeNotIn(List<String> values) {
            addCriterion("chapter_code not in", values, "chapterCode");
            return (Criteria) this;
        }

        public Criteria andChapterCodeBetween(String value1, String value2) {
            addCriterion("chapter_code between", value1, value2, "chapterCode");
            return (Criteria) this;
        }

        public Criteria andChapterCodeNotBetween(String value1, String value2) {
            addCriterion("chapter_code not between", value1, value2, "chapterCode");
            return (Criteria) this;
        }

        public Criteria andEventDictCodeIsNull() {
            addCriterion("event_dict_code is null");
            return (Criteria) this;
        }

        public Criteria andEventDictCodeIsNotNull() {
            addCriterion("event_dict_code is not null");
            return (Criteria) this;
        }

        public Criteria andEventDictCodeEqualTo(String value) {
            addCriterion("event_dict_code =", value, "eventDictCode");
            return (Criteria) this;
        }

        public Criteria andEventDictCodeNotEqualTo(String value) {
            addCriterion("event_dict_code <>", value, "eventDictCode");
            return (Criteria) this;
        }

        public Criteria andEventDictCodeGreaterThan(String value) {
            addCriterion("event_dict_code >", value, "eventDictCode");
            return (Criteria) this;
        }

        public Criteria andEventDictCodeGreaterThanOrEqualTo(String value) {
            addCriterion("event_dict_code >=", value, "eventDictCode");
            return (Criteria) this;
        }

        public Criteria andEventDictCodeLessThan(String value) {
            addCriterion("event_dict_code <", value, "eventDictCode");
            return (Criteria) this;
        }

        public Criteria andEventDictCodeLessThanOrEqualTo(String value) {
            addCriterion("event_dict_code <=", value, "eventDictCode");
            return (Criteria) this;
        }

        public Criteria andEventDictCodeLike(String value) {
            addCriterion("event_dict_code like", value, "eventDictCode");
            return (Criteria) this;
        }

        public Criteria andEventDictCodeNotLike(String value) {
            addCriterion("event_dict_code not like", value, "eventDictCode");
            return (Criteria) this;
        }

        public Criteria andEventDictCodeIn(List<String> values) {
            addCriterion("event_dict_code in", values, "eventDictCode");
            return (Criteria) this;
        }

        public Criteria andEventDictCodeNotIn(List<String> values) {
            addCriterion("event_dict_code not in", values, "eventDictCode");
            return (Criteria) this;
        }

        public Criteria andEventDictCodeBetween(String value1, String value2) {
            addCriterion("event_dict_code between", value1, value2, "eventDictCode");
            return (Criteria) this;
        }

        public Criteria andEventDictCodeNotBetween(String value1, String value2) {
            addCriterion("event_dict_code not between", value1, value2, "eventDictCode");
            return (Criteria) this;
        }

        public Criteria andEventOrderIsNull() {
            addCriterion("event_order is null");
            return (Criteria) this;
        }

        public Criteria andEventOrderIsNotNull() {
            addCriterion("event_order is not null");
            return (Criteria) this;
        }

        public Criteria andEventOrderEqualTo(Byte value) {
            addCriterion("event_order =", value, "eventOrder");
            return (Criteria) this;
        }

        public Criteria andEventOrderNotEqualTo(Byte value) {
            addCriterion("event_order <>", value, "eventOrder");
            return (Criteria) this;
        }

        public Criteria andEventOrderGreaterThan(Byte value) {
            addCriterion("event_order >", value, "eventOrder");
            return (Criteria) this;
        }

        public Criteria andEventOrderGreaterThanOrEqualTo(Byte value) {
            addCriterion("event_order >=", value, "eventOrder");
            return (Criteria) this;
        }

        public Criteria andEventOrderLessThan(Byte value) {
            addCriterion("event_order <", value, "eventOrder");
            return (Criteria) this;
        }

        public Criteria andEventOrderLessThanOrEqualTo(Byte value) {
            addCriterion("event_order <=", value, "eventOrder");
            return (Criteria) this;
        }

        public Criteria andEventOrderIn(List<Byte> values) {
            addCriterion("event_order in", values, "eventOrder");
            return (Criteria) this;
        }

        public Criteria andEventOrderNotIn(List<Byte> values) {
            addCriterion("event_order not in", values, "eventOrder");
            return (Criteria) this;
        }

        public Criteria andEventOrderBetween(Byte value1, Byte value2) {
            addCriterion("event_order between", value1, value2, "eventOrder");
            return (Criteria) this;
        }

        public Criteria andEventOrderNotBetween(Byte value1, Byte value2) {
            addCriterion("event_order not between", value1, value2, "eventOrder");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNull() {
            addCriterion("create_time is null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNotNull() {
            addCriterion("create_time is not null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeEqualTo(Date value) {
            addCriterionForJDBCDate("create_time =", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotEqualTo(Date value) {
            addCriterionForJDBCDate("create_time <>", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThan(Date value) {
            addCriterionForJDBCDate("create_time >", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("create_time >=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThan(Date value) {
            addCriterionForJDBCDate("create_time <", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("create_time <=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIn(List<Date> values) {
            addCriterionForJDBCDate("create_time in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotIn(List<Date> values) {
            addCriterionForJDBCDate("create_time not in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("create_time between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("create_time not between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeIsNull() {
            addCriterion("update_time is null");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeIsNotNull() {
            addCriterion("update_time is not null");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeEqualTo(Date value) {
            addCriterionForJDBCDate("update_time =", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotEqualTo(Date value) {
            addCriterionForJDBCDate("update_time <>", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeGreaterThan(Date value) {
            addCriterionForJDBCDate("update_time >", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("update_time >=", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeLessThan(Date value) {
            addCriterionForJDBCDate("update_time <", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("update_time <=", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeIn(List<Date> values) {
            addCriterionForJDBCDate("update_time in", values, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotIn(List<Date> values) {
            addCriterionForJDBCDate("update_time not in", values, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("update_time between", value1, value2, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("update_time not between", value1, value2, "updateTime");
            return (Criteria) this;
        }

        public Criteria andMemoIsNull() {
            addCriterion("memo is null");
            return (Criteria) this;
        }

        public Criteria andMemoIsNotNull() {
            addCriterion("memo is not null");
            return (Criteria) this;
        }

        public Criteria andMemoEqualTo(String value) {
            addCriterion("memo =", value, "memo");
            return (Criteria) this;
        }

        public Criteria andMemoNotEqualTo(String value) {
            addCriterion("memo <>", value, "memo");
            return (Criteria) this;
        }

        public Criteria andMemoGreaterThan(String value) {
            addCriterion("memo >", value, "memo");
            return (Criteria) this;
        }

        public Criteria andMemoGreaterThanOrEqualTo(String value) {
            addCriterion("memo >=", value, "memo");
            return (Criteria) this;
        }

        public Criteria andMemoLessThan(String value) {
            addCriterion("memo <", value, "memo");
            return (Criteria) this;
        }

        public Criteria andMemoLessThanOrEqualTo(String value) {
            addCriterion("memo <=", value, "memo");
            return (Criteria) this;
        }

        public Criteria andMemoLike(String value) {
            addCriterion("memo like", value, "memo");
            return (Criteria) this;
        }

        public Criteria andMemoNotLike(String value) {
            addCriterion("memo not like", value, "memo");
            return (Criteria) this;
        }

        public Criteria andMemoIn(List<String> values) {
            addCriterion("memo in", values, "memo");
            return (Criteria) this;
        }

        public Criteria andMemoNotIn(List<String> values) {
            addCriterion("memo not in", values, "memo");
            return (Criteria) this;
        }

        public Criteria andMemoBetween(String value1, String value2) {
            addCriterion("memo between", value1, value2, "memo");
            return (Criteria) this;
        }

        public Criteria andMemoNotBetween(String value1, String value2) {
            addCriterion("memo not between", value1, value2, "memo");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {
        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}